//
//  QCTermsUseVC.m
//  Quiz&Crossword
//
//  Created by 左维杰 on 2018/2/3.
//  Copyright © 2018年 左维杰. All rights reserved.
//

#import "QCTermsUseVC.h"

@interface QCTermsUseVC (){
    IBOutlet UIButton *_closeBtn;
    IBOutlet UIScrollView *_contianerView;
    IBOutlet UILabel *_textLabel;
}
@end

@implementation QCTermsUseVC

-(void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    CGSize size = [_textLabel sizeThatFits:CGSizeMake(CC_SCREEN_WIDTH-30.0f, 10000)];
    _contianerView.contentSize = CGSizeMake(CC_SCREEN_WIDTH, size.height);
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self.view addSubview:_contianerView];
    [_contianerView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(_closeBtn.mas_bottom).mas_offset(10.0f);
        make.left.right.bottom.mas_equalTo(self.view).mas_offset(0.0f);
    }];
    
    [_textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(CC_SCREEN_WIDTH-30.0f);
    }];

}


#pragma mark - user Event
-(IBAction)onClose{
    [self.navigationController popViewControllerAnimated:YES];
}

@end
